﻿namespace Common.Lib.Service
{
    public class ApiResponse : ApiResponse<object>
    {

        public ApiResponse(string message, bool status = false) : base(message, status)
        {
        }

        /// <summary>
        /// Api响应结果
        /// </summary>
        public ApiResponse(bool status, object result) : base(status, result)
        {

        }
    }

    public class ApiResponse<T>
    {
        /// <summary>
        /// 构造函数说明
        /// </summary>
        public ApiResponse()
        {

        }


        /// <summary>
        /// Api响应结果
        /// </summary>
        public ApiResponse(string message,bool status = false)
        {
            this.Message = message;
            this.Status = status;
        }

        /// <summary>
        /// Api响应结果
        /// </summary>
        public ApiResponse(bool status,T result)
        {
            this.Status = status;
            this.Result = result;
        }

        public string Message { get; set; }

        public bool Status { get; set; }

        public T Result { get; set; }
    }
}
